---
sidebar_class_name: hidden
---

# Bytes output parser

The `BytesOutputParser` takes language model output (either an entire response or as a stream) and converts
it into binary data. This is particularly useful for streaming output to the frontend from a server.

This output parser can act as a transform stream and work with streamed response chunks from a model.

## Usage

import CodeBlock from "@theme/CodeBlock";
import BytesExample from "@examples/prompts/bytes_output_parser_sequence.ts";

import IntegrationInstallTooltip from "@mdx_components/integration_install_tooltip.mdx";

<IntegrationInstallTooltip></IntegrationInstallTooltip>

```bash npm2yarn
npm install @langchain/openai
```

<CodeBlock language="typescript">{BytesExample}</CodeBlock>
